package com.ljd.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class ExcelListener extends AnalysisEventListener<ExcelData> {
    // 一行一行的读取excel内容，从第二行读取，第一行表头不读
    @Override
    public void invoke(ExcelData excelData, AnalysisContext analysisContext) {
        System.out.println(excelData);
    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头信息"+headMap);
    }
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
